package com.sharp.authorization.config.context;

import com.sharp.authorization.bo.account.AccountInfo;
import com.sharp.authorization.bo.user.UserInfo;
import com.sharp.authorization.holder.AccountContextHolder;

/**
 * Title: AccountContext
 * Description: Copyright: Copyright (c) 2019 Company: BHFAE
 *
 * @author Sharp
 * @date 2021/8/25 18:01
 */
public class AccountContext {

    public static AccountInfo getAccountInfo() {
        return AccountContextHolder.get();
    }

    public static UserInfo getUserInfo() {
        return AccountContextHolder.get().getUserInfo();
    }

    public static String getOperator() {
        return AccountContextHolder.get().getOperator();
    }

    public static String getCustomerName() {
        return AccountContextHolder.get().getUserInfo().getName();
    }
}
